#include <iostream>

using namespace std;

int  n, m;

int main()
{
	cin >> m >> n;
	double res = 0;
	for(int i = m; i <= n; i ++)
	{
		res = res + i * i + (1/double(i));
	}
	
	printf("%.6f", res);
	
	return 0;
}